import { createRequest } from './index'

// 教师端
// 收藏的开发项目列表
export const collectProjectPage = (data) => {
  return createRequest({
    url: `/teacher/collect-project/page`,
    method: 'get',
    params: data
  })
}
//收藏的学习项目列表
export const collectLearningPage = (data) => {
  return createRequest({
    url: `/teacher/collect-learning/page`,
    method: 'get',
    params: data
  })
}



// 学生端
// 收藏的开发项目列表
export const studentCollectProjectPage = (data) => {
  return createRequest({
    url: `/student/collect-project/page`,
    method: 'get',
    params: data
  })
}
//收藏的学习项目列表
export const studentCollectLearningPage = (data) => {
  return createRequest({
    url: `/student/collect-learning/page`,
    method: 'get',
    params: data
  })
}

// 收藏 开发项目列表
export const studentCollectProjectCollect = data => {
  return createRequest({
    url: `/student/collect-project/collect/${data.id}`,
    method: 'post',
		data
  })
}

// 取消收藏 开发项目列表
export const studentCollectProjectCancelCollect = data => {
  return createRequest({
    url: `/student/collect-project/cancelCollect/${data.id}`,
    method: 'post',
		data
  })
}


// 收藏
export const studentCollectLearningCollect = data => {
  return createRequest({
    url: `/student/collect-learning/collect/${data.id}`,
    method: 'post',
		data
  })
}

// 取消收藏
export const studentCollectLearningCancelCollect = data => {
  return createRequest({
    url: `/student/collect-learning/cancelCollect/${data.id}`,
    method: 'post',
		data
  })
}